{"ast":null,"code":"export const getLastMessage = messagesList => {\n  return messagesList.items[messagesList.items.length - 1];\n};\nexport const getUserNameLastMessage = (user, store) => {\n  return user.id === store.getProfile().id ? 'Вы:' : `${user.firstName || user.nickname}:`;\n};","map":{"version":3,"names":["getLastMessage","messagesList","items","length","getUserNameLastMessage","user","store","id","getProfile","firstName","nickname"],"sources":["/data/messenger.client/src/utils/Chat.ts"],"sourcesContent":["import {MessagesListItem} from \"../models/response/MessagesListItem\";\nimport {MessagesListResponse} from \"../models/response/MessagesListResponse\";\nimport {UserListItem} from \"../models/response/UserListItem\";\nimport Store from \"../store/store\";\n\nexport const getLastMessage = (messagesList: MessagesListResponse): MessagesListItem => {\n    return messagesList.items[messagesList.items.length - 1];\n}\n\nexport const getUserNameLastMessage = (user: UserListItem, store: Store): string => {\n    return (user.id === store.getProfile().id)?'Вы:':`${user.firstName || user.nickname}:`;\n}"],"mappings":"AAKA,OAAO,MAAMA,cAAc,GAAIC,YAAkC,IAAuB;EACpF,OAAOA,YAAY,CAACC,KAAK,CAACD,YAAY,CAACC,KAAK,CAACC,MAAM,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED,OAAO,MAAMC,sBAAsB,GAAG,CAACC,IAAkB,EAAEC,KAAY,KAAa;EAChF,OAAQD,IAAI,CAACE,EAAE,KAAKD,KAAK,CAACE,UAAU,EAAE,CAACD,EAAE,GAAE,KAAK,GAAE,GAAEF,IAAI,CAACI,SAAS,IAAIJ,IAAI,CAACK,QAAS,GAAE;AAC1F,CAAC"},"metadata":{},"sourceType":"module"}